
#Switch case
snippet sw
	switch (${1:/* condition */}) {
	case 1:
		${2:/* code */}
		break;
	default:
		break;
	}

snippet MLOG
	#if 1
	#define MLOGE(fmt, ...) printf("<E> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGW(fmt, ...) printf("<W> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGD(fmt, ...) printf("<D> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGI(fmt, ...) printf("<I> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#else
	#define MLOGE(fmt, ...) syslog(LOG_ERR,     "<E> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGW(fmt, ...) syslog(LOG_WARNING, "<W> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGD(fmt, ...) syslog(LOG_DEBUG,   "<D> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#define MLOGI(fmt, ...) syslog(LOG_INFO,    "<I> [%s:%d] " fmt , __func__, __LINE__, ##__VA_ARGS__)
	#endif
